const reqInterface = require('../../../../api/models')
Page({

  /**
   * 页面的初始数据
   */
  data: {
    info: {
      title: '',
      content: ''
    }
  },

  onShow() {
  },

  submit() {
    let self = this;
    reqInterface.PostNotice(self.data.info).then(res => {
      wx.showToast({
        title: '提交成功',
        icon: 'none'
      })
     wx.navigateBack()
    })
  },


  titleValue(e) {
    let self = this;
    self.setData({
      'info.title': e.detail.val
    })
  },

  contentValue(e) {
    let self = this;
    self.setData({
      'info.content': e.detail.val
    })
  },
})